package top.hcode.hoj.pojo.entity.course;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import top.hcode.hoj.pojo.entity.problem.Tag;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author orangej
 * @since 2024/12/17
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="课程", description="")
public class Course implements Serializable {

    private static final long serialVersionUID = -843594678585849361L;

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "课程名称")
    private String courseName;

    @ApiModelProperty(value = "课程简介")
    private String description;

    @ApiModelProperty(value = "列表页图片")
    private String listImage;

    @ApiModelProperty(value = "详情页图片")
    private String detailImage;

    @ApiModelProperty(value = "课时数量")
    private Integer hours;

    @ApiModelProperty(value = "是否启用，启用后学生才能观看")
    private Boolean enabled;

    @ApiModelProperty(value = "是否公开，公开后任何人都可以观看，否则只组内可见")
    private Boolean isPublic;

    @ApiModelProperty(value = "是否分享，分享后教师可复制")
    private Boolean isShare;

    @ApiModelProperty(value = "用户id")
    private String uid;

    @ApiModelProperty(value = "团队id")
    private Long gid;

    @TableField(fill = FieldFill.INSERT)
    private Date gmtCreate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;

    /*关联字段*/
    @TableField(exist = false)
    private List<Tag> tags;
}

